package com.finance.system.request;

import com.finance.framework.lang.valid.EnumValid;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * 用户入参form
 * Created by CBWL on 2017/3/15.
 */
@Data
public class MenuReq {
    private String id;//唯一标识
    /**
     * 菜单名称
     * */
    @NotBlank(message="菜单名称不可为空")
    @Length(max = 20,message = "名称长度不大于20")
    private String name;

    /**
     * 请求路径
     * */
    @Length(max = 1024,message = "url路径不大于1024")
    private String url;

    /**
     * 菜单code
     * */
    @NotBlank(message="菜单code不能为空")
    @Length(max = 20,message = "code不大于20")
    private String code;

    /**
     * 菜单sort
     * */
    @NotBlank(message="菜单顺序不能为空")
    private String sort;

    /**
     * 父级code
     * */
    @Length(max = 20,message = "pcode不大于20")
    private String pCode;

    /**
     * 类型 1目录 2菜单 3功能
     * */
    @EnumValid(enums = {"1","2","3"},message = "类型是枚举类型")
    @NotBlank(message = "类型不能为空")
    private String type;//类型

}
